package com.bluecoffee;

import com.bluecoffee.config.RandomProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * Created by qianlong on 16/9/4.
 */
@SpringBootApplication
@EnableConfigurationProperties(RandomProperties.class)
public class RestApplication {

    public static void main(String[] args) throws Exception {
        //接受命令行参数,如--server.port=8888
        SpringApplication.run(RestApplication.class, args);

        //不接受命令行参数
//        SpringApplication application = new SpringApplication(RestApplication.class);
//        application.setAddCommandLineProperties(false);
//        application.run(args);
    }
}
